package com.kgc.crowd.distributioncrowdcommon.api;

import com.kgc.crowd.distributioncrowdcommon.VO.ProjectVO;
import com.kgc.crowd.distributioncrowdcommon.pojo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("DISTRIBUTION-CROWD-DATABASE-PROVIDER")
public interface DataBaseOperationRemoteService {

    @RequestMapping("/database/provider/retrieve/loign/acct/count")
    ResultEntity<Integer> retrieveLoignAcctCount(@RequestParam("loginAcct") String loginAcct);

    @RequestMapping("/database/provider/save/member/remote")
    ResultEntity<String> saveMemberRemote(@RequestBody Member member);

    @RequestMapping("/database/provider/retrieve/member/by/login/acct")
    ResultEntity<Member> retrieveMemberByLoginAcct(@RequestParam("loginAcct") String loginAcct);

    @RequestMapping("/database/provider/save/project/remote/{memberId}")
    public ResultEntity<String> saveProjectRemote(
            @RequestBody ProjectVO projectVO,
            @PathVariable("memberId") String memberId);
    @RequestMapping("/database/provider/select/all/type")
    public ResultEntity<List<TypePO>> selectAllType();
    @RequestMapping("/database/provider/select/all/tag")
    public ResultEntity<List<TagPO>> selectAllTag();
    @RequestMapping("/database/provider/retrieve/member/launch/info/by/memberid")
    public ResultEntity<MemberLaunchInfoPO> retrieveMemberLaunchInfo(@RequestParam("memberid") Integer memberId);

}